package valoskmdev.util;


public class Utils {

	public static boolean isEmptyOrNull(final String value) {
		return value == null || value.isEmpty();
	}

	public static boolean validLength(final String value, final int minLength, final int maxLength,
			final boolean mandatory) {
		if (mandatory && value == null) {
			return false;
		} else if (value == null) {
			return true;
		}
		return value.length() >= minLength && value.length() <= maxLength;
	}

}
